﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class RoundElement : SyntaxTreeElement
    {
        private ExpressionElement value;

        public ExpressionElement Value { get { return value; } set { this.value = value; } }

        public RoundElement(TokenInfo StartInfo, ExpressionElement Value, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            value = Value;
        }

        public override string ToString()
        {
            return string.Format(":{0}", value);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return value;
        }
    }
}
